package com.xushi.bean;

public enum TemplateType {
    H5("h5"),
    WECHAT("wechat");

    private String type;

    private TemplateType(final String type) {
        this.type = type;
    }

    public String getType() {
        return this.type;
    }

    public String getName() {
        return this.name();
    }

    @Override
    public String toString() {
        return this.type;
    }

    public static boolean validType(String type) {
        for (TemplateType templateType : TemplateType.values()) {
            if (templateType.getType().equals(type))
                return true;
        }
        return false;
    }

}
